#include<iostream>
#include<vector>

using namespace std;

#ifndef _INTERCONDITIONS_H_
#define _INTERCONDITIONS_H_

class InterConditions
{
private:
  int n;                                //the number of interpolating points
  vector<double> X;			/* the values of these points  */
  vector<double> f;                     //the function vaules of these points
  vector<double> m;                     //the orders of derivative of these points
  vector<vector<double> > df;            //the derivative values of each order of these points
public:
  int sum()const;                            //get sum of vector<double>m
  int find_id(double x)const;                //return the index of x in vector<double>X
  int factorial(int i)const;                 //get i!
  vector<double> get_X()const;               //return the points needed by computing divided difference table
  vector<double> get_f()const;               //return vector<double> f
  InterConditions(int _n,vector<double> _X,vector<double> _f);
  InterConditions(int _n,vector<double> _X,vector<double> _f,vector<double> _m,vector<vector<double> > _df);
  vector<vector<double> > output_difftable()const;
  /** 
   *@brief produce the divided difference table
   *@param 
   *@return the data of format vector<vector<double>>
 */
  ~InterConditions(){};
};

#endif 
